package com.ylxn.sqlSession;

import com.ylxn.pojo.Configuration;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

public interface SqlSession {

    /**
     * 查询所有用户
     * @param statementId
     * @param <E>
     * @return
     */
    public <E> List<E> selectList(String statementId,Object... param) throws IllegalAccessException, IntrospectionException, InstantiationException, NoSuchFieldException, SQLException, InvocationTargetException, ClassNotFoundException;

    /**
     * 根据条件查询
     * @return
     */
    public <T> T  selectOne(String statementId,Object... param) throws IllegalAccessException, ClassNotFoundException, IntrospectionException, InstantiationException, SQLException, InvocationTargetException, NoSuchFieldException;
}
